import { defineConfig, presetAttributify, presetUno } from 'unocss';

export function createConfig({ strict = true, dev = true } = {}) {
    return defineConfig({
        envMode: dev ? 'dev' : 'build', 
        presets: [presetAttributify({ strict }), presetUno()],
    });
}

export default createConfig();
/**
 * presetUno是UnoCSS的默认预设 .m-1 margin:0.25rem;
 * presetAttributify 允许你直接在HTML标签中书写样式
 * 可以支持用属性来代替class定义样式
 * <h1 class="bg-red"></h1>
 * <h1 bg='red'></h1>
 */